// import $ from 'lib/jquery.esm';

$.ajax({
  type: "get",
  url: "../interface/dome01.php",
  dataType: "json"
}).then(res => {

  let template = '';
// console.log(res);
  res.forEach(el => {
    let pic = JSON.parse(el.picture);
    // console.log(pic);


    template += `<div><a href="./dome02.html?id=${el.id}">
    <img src="./${pic[0].src}" alt="">
      <p>${el.title}<br></p>
      <span>￥ ${el.price}</span>
  </a></div>`;
// console.log(template);
});
  
  $('#shop_m').html(template);

}).catch(xhr => {
  console.log(xhr.status);
});

